/*
 * @lc app=leetcode.cn id=448 lang=cpp
 *
 * [448] 找到所有数组中消失的数字
 */

// @lc code=start
#include <bits/stdc++.h>
using namespace std;
class Solution
{

public:
    vector<int> findDisappearedNumbers(vector<int> &nums)
    {
        vector<bool> vis(nums.size(), false);
        for (auto n : nums)
            vis[n - 1] = true;
        vector<int> ans;
        for (int i = 0; i < vis.size(); i++)
        {
            if (!vis[i])
                ans.push_back(i + 1);
        }
        return ans;
    }
};
// @lc code=end
